package com.ludomancy.gamelib;

public class Matrix
{
	public static byte[][] clone(byte[][] src)
	{
		byte[][] clone = new byte[src.length][src[0].length];
		for (int i = 0; i < src.length; i++)
		{
			clone[i] = new byte[src[i].length];
			System.arraycopy(src[i], 0, clone[i], 0, src[i].length);
		}
		return clone;
	}

	public static double[][] clone(double[][] src)
	{
		double[][] clone = new double[src.length][src[0].length];
		for (int i = 0; i < src.length; i++)
		{
			clone[i] = new double[src[i].length];
			System.arraycopy(src[i], 0, clone[i], 0, src[i].length);
		}
		return clone;
	}
}
